using DevComponents.DotNetBar;

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Shine.Framework;

namespace Shine.Tool
{
	public class FrmAddBookMark : Office2007Form
	{
	//	private BookMarkManager bm;

		private IApplication m_Application = null;

		private string _name;

		private IContainer components = null;

		private LabelX label1;

		private System.Windows.Forms.TextBox newBookMarkTextBox;

		private ButtonX addNewBookMarkButton;

		private ButtonX btnCancel;

		public IApplication Appliation
		{
			set
			{
				this.m_Application = value;
			}
		}

		public string BookMarkerName
		{
			get
			{
				return this._name;
			}
		}

		public FrmAddBookMark()
		{
			this.InitializeComponent();
		}

		private void FrmAddBookMark_Load(object sender, System.EventArgs e)
		{
			
		}

        private void addNewBookMarkButton_Click(object sender, System.EventArgs e)
        {
            string bookmarkname=this.newBookMarkTextBox.Text.Trim();
           if(bookmarkname=="")
            {
                DialogResult = DialogResult.None;
                return;
            }
            this._name = bookmarkname;
            base.DialogResult = System.Windows.Forms.DialogResult.OK;
            base.Close();
        }

        private void btnCancel_Click(object sender, System.EventArgs e)
		{
			base.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			base.Close();
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}

		private void InitializeComponent()
		{
            this.label1 = new DevComponents.DotNetBar.LabelX();
            this.newBookMarkTextBox = new System.Windows.Forms.TextBox();
            this.addNewBookMarkButton = new DevComponents.DotNetBar.ButtonX();
            this.btnCancel = new DevComponents.DotNetBar.ButtonX();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.BackColor = System.Drawing.Color.Transparent;
            // 
            // 
            // 
            this.label1.BackgroundStyle.Class = "";
            this.label1.Location = new System.Drawing.Point(9, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(56, 18);
            this.label1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
            this.label1.TabIndex = 0;
            this.label1.Text = "书签名：";
            // 
            // newBookMarkTextBox
            // 
            this.newBookMarkTextBox.Location = new System.Drawing.Point(62, 6);
            this.newBookMarkTextBox.Name = "newBookMarkTextBox";
            this.newBookMarkTextBox.Size = new System.Drawing.Size(178, 21);
            this.newBookMarkTextBox.TabIndex = 1;
            // 
            // addNewBookMarkButton
            // 
            this.addNewBookMarkButton.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            this.addNewBookMarkButton.Location = new System.Drawing.Point(90, 43);
            this.addNewBookMarkButton.Name = "addNewBookMarkButton";
            this.addNewBookMarkButton.Size = new System.Drawing.Size(66, 23);
            this.addNewBookMarkButton.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
            this.addNewBookMarkButton.TabIndex = 2;
            this.addNewBookMarkButton.Text = "确  定";
            this.addNewBookMarkButton.Click += new System.EventHandler(this.addNewBookMarkButton_Click);
            // 
            // btnCancel
            // 
            this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnCancel.Location = new System.Drawing.Point(162, 43);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(66, 23);
            this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
            this.btnCancel.TabIndex = 3;
            this.btnCancel.Text = "取  消";
            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
            // 
            // FrmAddBookMark
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.CancelButton = this.btnCancel;
            this.ClientSize = new System.Drawing.Size(234, 71);
            this.Controls.Add(this.btnCancel);
            this.Controls.Add(this.addNewBookMarkButton);
            this.Controls.Add(this.newBookMarkTextBox);
            this.Controls.Add(this.label1);
            this.DoubleBuffered = true;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "FrmAddBookMark";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "添加书签";
            this.TopMost = true;
            this.Load += new System.EventHandler(this.FrmAddBookMark_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

		}
    }
}
